﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using Cn.Edwon.Web.Support;
using Cn.Cellula.Biz.Port;
using Cn.Edwon.Spring;
using Cn.Cellula.Model;
using System.Collections.Generic;
using Cn.Cellula.Biz;
using Cn.Cellula.Model.System;

namespace Cn.Cellula.Website.Biz.Wuc {
    public partial class Wuc_ProductListDefault : WucSupport {
        IProductBiz biz = BizFactory.Get<IProductBiz>();
        
        protected void Page_Load(object sender, EventArgs e) {
            LoadList();
        }
        private void LoadList() { 
            //所有的产品分类
            String hql = "from VSysCategoryEO eo where eo.TypeKey='" + CodeTypeDef.Category.Product + "' and (eo.ParentId is null or eo.ParentId='')";
            hql += " order by eo.OrderNumber desc ";
            this.dl_Product.DataSource = biz.Find<VSysCategoryEO>(hql);
            this.dl_Product.DataBind();
        }
        public String ParsePicLink(Object link) {
            if (link==null || String.IsNullOrEmpty(link.ToString()))
                return "javascript:void(0);";
            else
                return link.ToString();
        }
    }
}